From 5929aa5781535119b4b7521ec3549dd42403cb86 Mon Sep 17 00:00:00 2001 From: "smh22@labyrinth.cl.cam.ac.uk" Date: Wed, 5 Nov 2003 11:57:19 +0000 Subject: [PATCH] bitkeeper revision 1.559.1.2 (3fa8e59fjgu1Rm3Cu-9n7CbSrKjgAg) manual merge --- xen/drivers/block/xen_block.c | 5 +++++ xen/include/hypervisor-ifs/vbd.h | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/xen/drivers/block/xen_block.c b/xen/drivers/block/xen_block.c index f989f2ed06..97f51e02f1 100644 --- a/xen/drivers/block/xen_block.c +++ b/xen/drivers/block/xen_block.c @@ -235,6 +235,11 @@ long do_block_io_op(block_io_op_t *u_block_io_op) } break; + case BLOCK_IO_OP_RING_ADDRESS: + op.u.ring_mfn = virt_to_phys(p->blk_ring_base) >> PAGE_SHIFT; + ret = copy_to_user(u_block_io_op, &op, sizeof(op)) ? -EFAULT : 0; + break; + case BLOCK_IO_OP_VBD_CREATE: /* create a new VBD for a given domain; caller must be privileged */ if(!IS_PRIV(p)) diff --git a/xen/include/hypervisor-ifs/vbd.h b/xen/include/hypervisor-ifs/vbd.h index ed7158c889..31c45bf529 100644 --- a/xen/include/hypervisor-ifs/vbd.h +++ b/xen/include/hypervisor-ifs/vbd.h @@ -36,12 +36,13 @@ typedef struct { /* Block I/O trap operations and associated structures. */ -#define BLOCK_IO_OP_SIGNAL 0 /* let xen know we have work to do */ -#define BLOCK_IO_OP_RESET 1 /* reset ring indexes on quiescent i/f */ -#define BLOCK_IO_OP_VBD_CREATE 2 /* create a new VBD for a given domain */ -#define BLOCK_IO_OP_VBD_ADD 3 /* add an extent to a given VBD */ -#define BLOCK_IO_OP_VBD_REMOVE 4 /* remove an extent from a given VBD */ -#define BLOCK_IO_OP_VBD_DELETE 5 /* delete a VBD */ +#define BLOCK_IO_OP_SIGNAL 0 /* let xen know we have work to do */ +#define BLOCK_IO_OP_RESET 1 /* reset ring indexes on quiescent i/f */ +#define BLOCK_IO_OP_RING_ADDRESS 2 /* returns machine address of I/O ring */ +#define BLOCK_IO_OP_VBD_CREATE 3 /* create a new VBD for a given domain */ +#define BLOCK_IO_OP_VBD_ADD 4 /* add an extent to a given VBD */ +#define BLOCK_IO_OP_VBD_REMOVE 5 /* remove an extent from a given VBD */ +#define BLOCK_IO_OP_VBD_DELETE 6 /* delete a VBD */ typedef struct _xen_extent { @@ -84,11 +85,12 @@ typedef struct block_io_op_st union { /* no entry for BLOCK_IO_OP_SIGNAL */ + /* no entry for BLOCK_IO_OP_RESET */ + unsigned long ring_mfn; vbd_create_t create_info; vbd_add_t add_info; vbd_remove_t remove_info; vbd_delete_t delete_info; - /* no entry for BLOCK_IO_OP_RESET */ } u; } block_io_op_t; -- 2.30.2